package com.lastproject.dto;

import java.io.Serializable;
import java.util.List;

import javax.faces.bean.ManagedProperty;


// Lazar Mihnea

public class QuestionOptionStatsDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int id;
	private int idQuestion;
	private String text;
	private String textDefault;
	private String type;
	private List<Integer> listAnswer;
	private List<AnswerStatsDTO> answerList;
	private String percAnswered;
	
	@ManagedProperty(value = "#{questionOptionDTO")
	QuestionOptionDTO questionOptionDTO;

	public QuestionOptionStatsDTO() {
		super();
		// TODO Auto-generated constructor stub
	}

	public QuestionOptionStatsDTO(int id, int idQuestion, String text,
			String textDefault, String type, List<Integer> listAnswer) {
		super();
		this.id = id;
		this.idQuestion = idQuestion;
		this.text = text;
		this.textDefault = textDefault;
		this.type = type;
		this.listAnswer = listAnswer;
	}
	
	public QuestionOptionStatsDTO(QuestionOptionDTO questionOptionDTO) {
		super();
		this.questionOptionDTO = questionOptionDTO;
		this.id = questionOptionDTO.getId();
		this.idQuestion = questionOptionDTO.getQuestionId();
		this.text = questionOptionDTO.getText();
		this.textDefault = questionOptionDTO.getTextDefault();
		this.type = questionOptionDTO.getType();
		this.listAnswer = questionOptionDTO.getListAnswer();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getIdQuestion() {
		return idQuestion;
	}

	public void setIdQuestion(int idQuestion) {
		this.idQuestion = idQuestion;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getTextDefault() {
		return textDefault;
	}

	public void setTextDefault(String textDefault) {
		this.textDefault = textDefault;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<Integer> getListAnswer() {
		return listAnswer;
	}

	public void setListAnswer(List<Integer> listAnswer) {
		this.listAnswer = listAnswer;
	}

	

	public List<AnswerStatsDTO> getAnswerList() {
		return answerList;
	}

	public void setAnswerList(List<AnswerStatsDTO> answerList) {
		this.answerList = answerList;
	}

	public QuestionOptionDTO getQuestionOptionDTO() {
		return questionOptionDTO;
	}

	public void setQuestionOptionDTO(QuestionOptionDTO questionOptionDTO) {
		this.questionOptionDTO = questionOptionDTO;
	}

	public String getPercAnswered() {
		return percAnswered;
	}

	public void setPercAnswered(String percAnswered) {
		this.percAnswered = percAnswered;
	}
	
	

}
